@extends('backend.template.bootstrap')
@section('content')
<div id="page-wrapper" >
    <div id="page-inner">
        <div class="row">
            <div class="col-md-12">
                <h1 class="page-header">
					图片列表 <small>Pictures.<i class="fa fa-binoculars"></i></small>
                </h1>
                <ol class="breadcrumb">
                    <li><a href="#">首页</a></li>
                    <li><a href="{{ url('backend/galleries') }}">相册</a></li>
                    <li class="active">{{ $gallery->name }} 图片列表</li>
                </ol>
            </div>
        </div>
        <!-- /. ROW  -->
        <div class="row">
            <div class="col-md-12">
                <!-- Advanced Tables -->
                <div class="panel panel-default">
                    <div class="panel-body">
                        <a href="{{ url('backend/galleries/'.$gallery->id.'/imgs/create') }}" class="btn btn-primary"><li class="fa fa-edit"></li> 上传照片</a>
                        <br />
                        <br />
                        @if($imgs->count() > 0)
						<div class="row">
						@foreach($imgs as $img)
							<div class="col-sm-2">
								<div class="thumbnail">
									<img src="{{ $img->imgUrl('242x200') }}" alt="" style="border: solid 1px; border-color: #ddd;">
									@if($img->is_cover)
									<li class="glyphicon glyphicon-bookmark" style="position:absolute; padding-top:6px; font-size: 40px; color: #1CC09F;"></li>
									@endif
									<div class="caption">
										<h3>{{ $img->name }}</h3>
										<p style="font-size: 12px;">{{ $img->abstract }}</p>
										<div style="font-size: 13px;">
											<a href="#" class="fa fa-heart-o" style="color: #777777;"> {{ $img->goods }}</a>
											<a href="#" class="fa fa-comment-o" style="color: #777777;"> {{ $img->commonts->count() }}</a>&nbsp;&nbsp;
											@if(!$img->is_cover)
											<a href="#" style="color: #777777;">设为封面</a>
											@endif
											<div style="float: right;">
												<a href="#" class="fa fa-trash-o" style="color: #777777;"></a>&nbsp;&nbsp;
											</div>
										</div>
									</div>
								</div>
							</div>
						@endforeach
						</div>
						@else
						<br />
						<br />
	                    <div class="col-sm-12 col-xs-12">
							<h4>暂无照片</h4>
						</div>
						<br />
						<br />
						@endif
                    </div>
                </div>
                <!--End Advanced Tables -->
            </div>
        </div>
    </div>
    <!-- /. PAGE INNER  -->

</div>
@endsection